<template>
    <div class="register">
      <p>注册账号</p>
      <input type="text" placeholder="请输入手机号">
      <div class="verification">
        <input type="text" placeholder="请输短信验证码">
        <span>发送验证码</span>
      </div>
      <div class="password">
        <input :type="this.registration_data.pwdType" placeholder="请输入密码">
        <div class="span" @click="changeType">
          <img :src="this.registration_data.src" alt="">
        </div>
      </div>
      <p class="prompt">密码由8-16位数字、字母或符号组成,至少含有两种及以上的字符</p>
      <div class="agreement">
        <input type="checkbox">
        <p>已阅读并同意 <a href="#">用户协议</a> </p>
      </div>
      <button @click="toLogin">注册</button>
    </div>
</template>

<script>
    export default {
      name: "register",
      data() {
        return {
          registration_data: {
            pwdType: "password",
            src: require("./icon_80i3ne5pv64/biyan.png")
          }
        }
      },
      methods: {
        toLogin(){
          this.$router.push({path:'./login'})
        },
        // 改变密码状态
        changeType() {
          this.registration_data.pwdType = this.registration_data.pwdType === 'password' ? 'text' : 'password';
          this.registration_data.src = this.registration_data.src === require("./icon_80i3ne5pv64/biyan.png") ? require("./icon_80i3ne5pv64/kaiyan.png") : require("./icon_80i3ne5pv64/biyan.png");
        }
      }
    }
</script>

<style scoped lang="scss">
.register{
  position: absolute;
  z-index: 999;
  width: 100vw;
  height: 100vh;
  background: #fff;
  padding: 85px 90px;
  box-sizing: border-box;
  p{
    text-align: center;
    font-size: 50px;
    color: #0a1a26;
    margin:0 0 140px 0;
  }
  input{
    width: 100%;
    height: 170px;
    outline: none;
    line-height: 170px;
    border: none;
    border-bottom: 1px solid #e5e5e5;
    color: #c7c7c7;
  }
  .verification{
    display: flex;
    border-bottom: 1px solid #e5e5e5;
    input{
      flex: 1;
      border: none;
    }
    span{
      width: 305px;
      margin: 30px;
      font-size: 45px;
      text-align: center;
      line-height: 105px;
    }
  }
  .password{
    display: flex;
    border-bottom: solid 1px #e5e5e5;
    input{
      flex: 1;
      border: none;
    }
    .span{
      width: 170px;
      text-align: center;
      line-height: 170px;
      img{
        width: 56px;
      }
    }
  }
  .prompt{
    height: 90px;
    line-height: 90px;
    font-size: 28px;
    color: #bbbcc8;
    text-align: left;
  }
  button{
    width: 100%;
    height: 140px;
    font-size: 50px;
    outline: none;
    color: #fff;
    border-radius: 15px;
    border: none;
    background: -webkit-linear-gradient(left, #ff2d3d, #ff6437);
  }
  .agreement{
    display: flex;
    height: 60px;
    margin-bottom: 105px;
    input{
      width: 60px;
      height: 60px;
    }
    p{
      font-size: 45px;
      color: #aaa;
      text-indent: 0.5em;
      margin: 0;
      line-height: 60px;
      a{
        text-decoration: none;
        color: #ff6037;
      }
    }
  }
}
</style>
